#include "StdAfx.h"
#include "Food.h"



CFood::CFood(int startX, int startY) : CActior("src/texture/apple.png")
{
	SetPoint(startX, startY);
}


CFood::~CFood(void)
{
}

CFood* CFood::RandCreateOne(int nLeft, int nTop, int nRight, int nBottom)
{
	int nWidth = nRight - nLeft;
	int nHeight = nBottom - nTop;
	int x = rand() % nWidth + nLeft;
	int y = rand() % nHeight + nTop;

	CFood* pFood = new CFood(x, y);

	return pFood;
}
